var n = getApp();

Page({
    data: {
        language: "",
        id: "",
        data: []
    },
    onLoad: function(n) {
        n.id && this.setData({
            id: n.id
        }), wx.showLoading({
            title: "加载中",
            icon: "none"
        }), this.initData();
    },
    onReady: function() {
        var n = wx.getStorageSync("langIndex");
        this.setData({
            language: n.en
        });
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    initData: function() {
        var t = this, a = n.getNetAddresss("plugin.supplier.frontend.insurance.insuranceDetail");
        a += "&id=" + t.data.id, n._getNetWork({
            url: a,
            success: function(n) {
                wx.hideLoading({
                    complete: function(n) {}
                });
                var a = n.data;
                console.log(a), 1 == a.result ? t.setData({
                    data: a.data
                }) : wx.showToast({
                    icon: "none",
                    title: a.msg,
                    duration: 1500
                });
            },
            fail: function(n) {
                console.log(n);
            }
        });
    }
});